﻿using System.Windows;
using System.Windows.Media;

namespace Silverlight.InputCtrl
{
    public class ValidatorErrorMessage : DependencyObject
    {
        public string ElementValidator
        {
            get { return (string)GetValue(ElementValidatorProperty); }
            set { SetValue(ElementValidatorProperty, value); }
        }

        // Using a DependencyProperty as the backing store for ElementName.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty ElementValidatorProperty =
            DependencyProperty.Register("ElementValidator", typeof(string), typeof(ValidatorErrorMessage), new PropertyMetadata(""));

        public string ElementError
        {
            get { return (string)GetValue(ElementErrorProperty); }
            set { SetValue(ElementErrorProperty, value); }
        }

        // Using a DependencyProperty as the backing store for ElementName.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty ElementErrorProperty =
            DependencyProperty.Register("ElementError", typeof(string), typeof(ValidatorErrorMessage), new PropertyMetadata(""));

        public Brush ErrorBackground
        {
            get { return (Brush)GetValue(ErrorBackgroundProperty); }
            set { SetValue(ErrorBackgroundProperty, value); }
        }

        // Using a DependencyProperty as the backing store for triggerLostFocus.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty ErrorBackgroundProperty =
            DependencyProperty.Register("ErrorBackground", typeof(Brush), typeof(ValidatorErrorMessage), new PropertyMetadata(null));

        public Brush ErrorForeground
        {
            get { return (Brush)GetValue(ErrorForegroundProperty); }
            set { SetValue(ErrorForegroundProperty, value); }
        }

        // Using a DependencyProperty as the backing store for triggerLostFocus.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty ErrorForegroundProperty =
            DependencyProperty.Register("ErrorForeground", typeof(Brush), typeof(ValidatorErrorMessage), new PropertyMetadata(null));

        public FontFamily ErrorFontFamily
        {
            get { return (FontFamily)GetValue(ErrorFontFamilyProperty); }
            set { SetValue(ErrorFontFamilyProperty, value); }
        }

        public static readonly DependencyProperty ErrorFontFamilyProperty =
            DependencyProperty.Register("ErrorFontFamily", typeof(FontFamily), typeof(ValidatorErrorMessage), new PropertyMetadata(null));

        public double ErrorFontSize
        {
            get { return (double)GetValue(ErrorFontSizeProperty); }
            set { SetValue(ErrorFontSizeProperty, value); }
        }

        public static readonly DependencyProperty ErrorFontSizeProperty =
            DependencyProperty.Register("ErrorFontSize", typeof(double), typeof(ValidatorErrorMessage), new PropertyMetadata(0.0));

        public FontWeight ErrorFontWeight
        {
            get { return (FontWeight)GetValue(ErrorFontWeightProperty); }
            set { SetValue(ErrorFontWeightProperty, value); }
        }

        public static readonly DependencyProperty ErrorFontWeightProperty =
            DependencyProperty.Register("ErrorFontWeight", typeof(FontWeight), typeof(ValidatorErrorMessage), new PropertyMetadata(null));

    }
}
